package model;

import java.util.Date;

import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

@XmlRootElement
public class YKienBanDoc {
	private long idYKienBanDoc;
	private BaiViet baiViet;
	private NguoiDung nguoiGui;
	private String noiDung;
	private Date ngayGui;

	public YKienBanDoc() {
	}

	public YKienBanDoc(BaiViet baiViet, NguoiDung nguoiGui, String noiDung,
			Date ngayGui) {
		this.baiViet = baiViet;
		this.nguoiGui = nguoiGui;
		this.noiDung = noiDung;
		this.ngayGui = ngayGui;
		baiViet.addYkienBanDoc(this);
	}

	public long getIdYKienBanDoc() {
		return idYKienBanDoc;
	}

	public void setIdYKienBanDoc(long idYKienBanDoc) {
		this.idYKienBanDoc = idYKienBanDoc;
	}

	@XmlTransient
	public BaiViet getBaiViet() {
		return baiViet;
	}

	public void setBaiViet(BaiViet baiViet) {
		this.baiViet = baiViet;
	}

	public NguoiDung getNguoiGui() {
		return nguoiGui;
	}

	public void setNguoiGui(NguoiDung nguoiGui) {
		this.nguoiGui = nguoiGui;
	}

	public String getNoiDung() {
		return noiDung;
	}

	public void setNoiDung(String noiDung) {
		this.noiDung = noiDung;
	}

	public Date getNgayGui() {
		return ngayGui;
	}

	public void setNgayGui(Date ngayGui) {
		this.ngayGui = ngayGui;
	}

}
